package ${entity.actionPackageName};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.etcn.common.controller.BaseController;
import org.springframework.web.bind.annotation.ResponseBody;
import com.etcn.common.annotation.Manage;
import ${entity.servicePackageName}.I${entity.className}Service;
import ${entity.entityPackageName}.${entity.className};

/**
 * ${entity.classDesc}controller
 * @author ${entity.author}
 * @date: ${entity.createTime}
 */
@Controller
@RequestMapping("/API1.0/${entity.className}")
public class ${entity.className}Controller extends BaseController {

	@Autowired
    private I${entity.className}Service ${entity.className?uncap_first}Service;

     /**
     * 根据id查询${entity.classDesc}
     */
    @Manage
    @RequestMapping(value = "getById", method = RequestMethod.GET)
    public @ResponseBody Object getById(${entity.className} ${entity.classInstanceName}) throws Exception{
    	return ${entity.className?uncap_first}Service.getById(${entity.classInstanceName}.getId());
    }
    
}